
import React, { Component } from "react";
import { Image, Loading, Tag } from "antd-mobile/2x"
import "./index.scss"
const colors = ["#87d068", "#108ee9", "#2db7f5"];
class index extends Component {
  render() {
    const { desc,
      houseCode,
      houseImg,
      price,
      tags,
      title } = this.props
    return (
      <>
        <div className="roomList_item" key={houseCode}>
          <div className="item_img">
            <Image
              lazy
              width={120}
              height={100}
              placeholder={<Loading />}
              src={"http://47.102.145.189:8009" + houseImg}
            />
          </div>
          <div className="item_content">
            <h4>{title}</h4>
            <p style={{ color: "#999", fontSize: "10px" }}>{desc}</p>
            <p>
              {tags.map((item, ind) => {
                return (
                  <Tag className="tagChild" color={colors[ind]} key={ind + "a"}>
                    {item}
                  </Tag>
                );
              })}
            </p>
            <p>
              <span>{price}</span>源/月
            </p>
          </div>
        </div>
      </>
    );
  }
}

export default index;
